# !/bin/bash
list=(`jq '.data[] .branch' bank2.log`)
# cityCode=(`jq -r '.[] .branch' citys.json`)
branch=(`jq -r '.data[] .branch[] .code'`)
# bankCode=(`jq -r '.banks[] .code' bank.json`)

echo '\n======================================\n' > bank2.log

len=${#list[@]}
for((i=0; i<$len; i++)) do
    # branch2=${branch[$i]}
    # echo $branch2;
    echo $i
    # cat json.json | jq -r '.[0].ipv4' | jq -r '.[0]'
    # len=${#lbranchist[@]}
	# for((j=0; j<$clen; j++)) do
	# 	echo $i
	# 	echo '{ "bankCode": "'${bankCode[$i]}'", "cityCode": "'${cityCode[$j]}'", "branch": ' >> bank2.log
	# 	echo ' },' >> bank2.log

	# done;
done;
